<?php

namespace App\Exception;

use Symfony\Component\Validator\Exception\InvalidArgumentException;
use Throwable;

class ApiParamValidationException extends InvalidArgumentException {
    public function __construct ($message = [], $code = 422, Throwable $previous = null) {
        $this->setCode($code);
        $this->setMessage($message);
    }

    /**
     * @param mixed $message
     */
    public function setMessage ($message = []): void {
        $this->message = $message;
    }

    /**
     * @param mixed $code
     */
    public function setCode ($code): void {
        $this->code = $code;
    }
}